#!/usr/bin/env python
# -*- coding: utf-8 -*-
from easygconf.gconfdict import GConfDict
from daemon import Daemon
import time
import random
import os

from functions import *

class MyDaemon(Daemon):
    def run(self):
        while True:
            randomize(wallpapers,dirname,gc)
            time.sleep(60*10)

gc = GConfDict('/desktop/gnome/background')

daemon = MyDaemon('/tmp/critters-wallpaper-switcher.pid')
daemon.start()